package com.wang.interview.designmode.strategy;

/**
 * @author: wang
 * @date: 2021/8/1 19:57
 * @description: 人共有的属性，组合额外的功能
 */
public abstract class AbstractMan {

    private Function1 function1;
    private Function2 function2;

    public AbstractMan(Function1 function1, Function2 function2) {
        this.function1 = function1;
        this.function2 = function2;
    }

    public void setFunction1(Function1 function1) {
        this.function1 = function1;
    }

    public void setFunction2(Function2 function2) {
        this.function2 = function2;
    }

    public void sleep(){}

    public void otherFunction(){
        function1.eat();
        function2.bathe();
    }



}
